Skip to content

fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work#52

Merged
mattmillerai merged 3 commits into
mainfrom
matt/pr-size-gowork-off-for-consumer-gowork
Jul 21, 2026
Merged

fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work#52
mattmillerai merged 3 commits into
mainfrom
matt/pr-size-gowork-off-for-consumer-gowork

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

Problem

The reusable pr-size.yml checks out the check-pr-size tool into _pr_size_tool/ under the consumer repo's checkout, then runs go build there. When the consumer repo has a go.work at its checkout root (e.g. Comfy-Org/cloud), go build discovers that workspace file, sees the tool module isn't one of its listed modules, and fails:

current directory is contained in a module that is not one of the workspace modules listed in go.work
##[error]Process completed with exit code 1.

This is blocking Comfy-Org/cloud#5336 (the flip to this reusable caller, BE-3483) — the pr-size job dies at the build step before it can even count the diff.

Fix

Set GOWORK: off on the Build check-pr-size step. The tool module is dependency-free (no go.sum), so building it in single-module mode is safe and correct — it just stops the consumer's workspace from leaking into the tool build.

Verification

Reproduced locally with a nested module under a root go.work that lists only other modules:

WITHOUT GOWORK=off → 'current directory is contained in a module that is not one of the workspace modules listed in go.work'  (exit 1)
WITH    GOWORK=off → exit 0

Once merged, Comfy-Org/cloud#5336's caller will be re-pinned to the merged SHA.

🤖 Generated with Claude Code

…a root go.work

The reusable pr-size workflow checks out the check-pr-size tool into
_pr_size_tool/ under the consumer repo's checkout, then runs `go build`
there. When the consumer repo has a go.work at its checkout root (e.g.
Comfy-Org/cloud), Go discovers that workspace file, sees the tool module
is not one of its listed modules, and fails the build:

    current directory is contained in a module that is not one of the
    workspace modules listed in go.work

The tool module is dependency-free (no go.sum), so building it in
single-module mode is safe and correct. Set GOWORK=off on the build
step so the consumer's workspace never leaks into the tool build.

Reproduced locally: a nested module under a root go.work that lists
only other modules fails to `go build` and succeeds with GOWORK=off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2889dc22-9e3f-44f0-b25c-98ba56b57cd8

📥 Commits

Reviewing files that changed from the base of the PR and between 07154fb and f9d638a.

📒 Files selected for processing (1)
  • .github/workflows/pr-size.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/pr-size-gowork-off-for-consumer-gowork
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch matt/pr-size-gowork-off-for-consumer-gowork

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added the cursor-review Multi-model cursor review label Jul 21, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 1 finding(s).

Severity Count
🟠 High 1

Panel: 8/8 reviewers contributed findings.

Comment thread .github/workflows/pr-size.yml Outdated
mattmillerai and others added 2 commits July 21, 2026 12:05
Unquoted `off` is resolved as YAML 1.1 boolean false by the GitHub Actions
parser and exported as GOWORK=false. Go then treats it as a workspace-file
path and aborts with "$GOWORK must be an absolute path", failing the build
step unconditionally instead of disabling workspace mode. Quoting passes the
literal string "off" through, which is what actually disables workspace mode.

Raised by cursor-review adversarial panel (claude-opus-4-8-thinking-max).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ff-for-consumer-gowork

# Conflicts:
#	.github/workflows/pr-size.yml
@mattmillerai
mattmillerai merged commit 80941f6 into main Jul 21, 2026
3 checks passed
@mattmillerai
mattmillerai deleted the matt/pr-size-gowork-off-for-consumer-gowork branch July 21, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Multi-model cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant